.class public Lcom/teewoo/app/bus/model/weather/Weather;
.super Ljava/lang/Object;
.source "Weather.java"

# interfaces
.implements Ljava/io/Serializable;


# static fields
.field public static final WEATHER:Ljava/lang/String; = "weather"

.field private static diet_suggestion:Ljava/lang/String; = null

.field private static final serialVersionUID:J = 0x139c88748cc316b8L

.field private static suggestion:Ljava/lang/String;

.field private static suggestion1:[Ljava/lang/String;

.field private static suggestion2:[Ljava/lang/String;

.field private static suggestion3:[Ljava/lang/String;

.field private static suggestion4:[Ljava/lang/String;


# instance fields
.field private currentCondition:Lcom/teewoo/app/bus/model/weather/CurrentCondition;

.field private forecastInformation:Lcom/teewoo/app/bus/model/weather/ForecastInformation;

.field public forecasts:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lcom/teewoo/app/bus/model/weather/ForecastCondition;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 28
    const-string v0, "\u996e\u98df\u5efa\u8bae\uff1a"

    sput-object v0, Lcom/teewoo/app/bus/model/weather/Weather;->diet_suggestion:Ljava/lang/String;

    .line 29
    const-string v0, "\u6027\u5473\u4e2d\u6027\u98df\u54c1\u4e3a\u4e3b\u517c\u987e\u4e2a\u4eba\u996e\u98df\u7231\u597d\u3002"

    sput-object v0, Lcom/teewoo/app/bus/model/weather/Weather;->suggestion:Ljava/lang/String;

    .line 30
    sget-object v0, Lcom/teewoo/app/bus/util/StaticParams;->SUGGEESTION1:[Ljava/lang/String;

    sput-object v0, Lcom/teewoo/app/bus/model/weather/Weather;->suggestion1:[Ljava/lang/String;

    .line 31
    sget-object v0, Lcom/teewoo/app/bus/util/StaticParams;->SUGGEESTION2:[Ljava/lang/String;

    sput-object v0, Lcom/teewoo/app/bus/model/weather/Weather;->suggestion2:[Ljava/lang/String;

    .line 32
    sget-object v0, Lcom/teewoo/app/bus/util/StaticParams;->SUGGEESTION3:[Ljava/lang/String;

    sput-object v0, Lcom/teewoo/app/bus/model/weather/Weather;->suggestion3:[Ljava/lang/String;

    .line 33
    sget-object v0, Lcom/teewoo/app/bus/util/StaticParams;->SUGGEESTION4:[Ljava/lang/String;

    sput-object v0, Lcom/teewoo/app/bus/model/weather/Weather;->suggestion4:[Ljava/lang/String;

    .line 22
    return-void
.end method

.method public constructor <init>()V
    .locals 2

    .prologue
    const/4 v0, 0x0

    .line 41
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 24
    iput-object v0, p0, Lcom/teewoo/app/bus/model/weather/Weather;->forecastInformation:Lcom/teewoo/app/bus/model/weather/ForecastInformation;

    .line 25
    iput-object v0, p0, Lcom/teewoo/app/bus/model/weather/Weather;->currentCondition:Lcom/teewoo/app/bus/model/weather/CurrentCondition;

    .line 42
    new-instance v0, Ljava/util/Vector;

    const/4 v1, 0x0

    invoke-direct {v0, v1}, Ljava/util/Vector;-><init>(I)V

    iput-object v0, p0, Lcom/teewoo/app/bus/model/weather/Weather;->forecasts:Ljava/util/List;

    .line 43
    return-void
.end method

.method public constructor <init>(Lcom/teewoo/app/bus/model/weather/ForecastInformation;Lcom/teewoo/app/bus/model/weather/CurrentCondition;Ljava/util/List;)V
    .locals 1
    .parameter "forecastInformation"
    .parameter "currentCondition"
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/teewoo/app/bus/model/weather/ForecastInformation;",
            "Lcom/teewoo/app/bus/model/weather/CurrentCondition;",
            "Ljava/util/List",
            "<",
            "Lcom/teewoo/app/bus/model/weather/ForecastCondition;",
            ">;)V"
        }
    .end annotation

    .prologue
    .local p3, forecasts:Ljava/util/List;,"Ljava/util/List<Lcom/teewoo/app/bus/model/weather/ForecastCondition;>;"
    const/4 v0, 0x0

    .line 50
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 24
    iput-object v0, p0, Lcom/teewoo/app/bus/model/weather/Weather;->forecastInformation:Lcom/teewoo/app/bus/model/weather/ForecastInformation;

    .line 25
    iput-object v0, p0, Lcom/teewoo/app/bus/model/weather/Weather;->currentCondition:Lcom/teewoo/app/bus/model/weather/CurrentCondition;

    .line 51
    iput-object p1, p0, Lcom/teewoo/app/bus/model/weather/Weather;->forecastInformation:Lcom/teewoo/app/bus/model/weather/ForecastInformation;

    .line 52
    iput-object p2, p0, Lcom/teewoo/app/bus/model/weather/Weather;->currentCondition:Lcom/teewoo/app/bus/model/weather/CurrentCondition;

    .line 53
    iput-object p3, p0, Lcom/teewoo/app/bus/model/weather/Weather;->forecasts:Ljava/util/List;

    .line 54
    return-void
.end method

.method public static getSuggestion(Lcom/teewoo/app/bus/model/weather/CurrentCondition;)Ljava/lang/String;
    .locals 6
    .parameter "currentCondition"

    .prologue
    .line 84
    invoke-virtual {p0}, Lcom/teewoo/app/bus/model/weather/CurrentCondition;->getHumidity()Ljava/lang/String;

    move-result-object v0

    const/4 v1, 0x4

    const/4 v2, 0x6

    invoke-virtual {v0, v1, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v1

    .line 86
    .local v1, str_hum:Ljava/lang/String;
    const-wide/16 v2, 0x0

    invoke-static {v2, v3}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v0

    .line 87
    .local v0, hum:Ljava/lang/Double;
    const-wide/16 v2, 0x0

    invoke-static {v2, v3}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v2

    .line 89
    .local v2, temp:Ljava/lang/Double;
    :try_start_0
    invoke-static {v1}, Ljava/lang/Double;->valueOf(Ljava/lang/String;)Ljava/lang/Double;

    move-result-object v0

    .line 90
    invoke-virtual {p0}, Lcom/teewoo/app/bus/model/weather/CurrentCondition;->getTemp_c()Ljava/lang/String;

    move-result-object p0

    .end local p0
    invoke-static {p0}, Ljava/lang/Double;->valueOf(Ljava/lang/String;)Ljava/lang/Double;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object p0

    .end local v2           #temp:Ljava/lang/Double;
    .local p0, temp:Ljava/lang/Double;
    move-object v1, p0

    .end local p0           #temp:Ljava/lang/Double;
    .local v1, temp:Ljava/lang/Double;
    move-object p0, v0

    .line 94
    .end local v0           #hum:Ljava/lang/Double;
    .local p0, hum:Ljava/lang/Double;
    :goto_0
    new-instance v0, Ljava/util/Random;

    invoke-direct {v0}, Ljava/util/Random;-><init>()V

    .line 95
    .local v0, ran:Ljava/util/Random;
    invoke-virtual {p0}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    const-wide/high16 v4, 0x4044

    cmpg-double v2, v2, v4

    if-gez v2, :cond_0

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    const-wide/high16 v4, 0x4014

    cmpl-double v2, v2, v4

    if-lez v2, :cond_0

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    const-wide/high16 v4, 0x4034

    cmpg-double v2, v2, v4

    if-gez v2, :cond_0

    .line 96
    new-instance p0, Ljava/lang/StringBuilder;

    .end local p0           #hum:Ljava/lang/Double;
    sget-object v1, Lcom/teewoo/app/bus/model/weather/Weather;->diet_suggestion:Ljava/lang/String;

    .end local v1           #temp:Ljava/lang/Double;
    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {p0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v1, Lcom/teewoo/app/bus/model/weather/Weather;->suggestion1:[Ljava/lang/String;

    const/4 v2, 0x3

    invoke-virtual {v0, v2}, Ljava/util/Random;->nextInt(I)I

    move-result v0

    .end local v0           #ran:Ljava/util/Random;
    aget-object v0, v1, v0

    invoke-virtual {p0, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object p0

    invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    .line 104
    :goto_1
    return-object p0

    .line 91
    .local v0, hum:Ljava/lang/Double;
    .local v1, str_hum:Ljava/lang/String;
    .restart local v2       #temp:Ljava/lang/Double;
    :catch_0
    move-exception p0

    .line 92
    .local p0, e:Ljava/lang/Exception;
    invoke-virtual {p0}, Ljava/lang/Exception;->printStackTrace()V

    move-object v1, v2

    .end local v2           #temp:Ljava/lang/Double;
    .local v1, temp:Ljava/lang/Double;
    move-object p0, v0

    .end local v0           #hum:Ljava/lang/Double;
    .local p0, hum:Ljava/lang/Double;
    goto :goto_0

    .line 97
    .local v0, ran:Ljava/util/Random;
    :cond_0
    invoke-virtual {p0}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    const-wide/high16 v4, 0x4044

    cmpg-double v2, v2, v4

    if-gez v2, :cond_1

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    const-wide/high16 v4, 0x4014

    cmpg-double v2, v2, v4

    if-gez v2, :cond_1

    .line 98
    new-instance p0, Ljava/lang/StringBuilder;

    .end local p0           #hum:Ljava/lang/Double;
    sget-object v1, Lcom/teewoo/app/bus/model/weather/Weather;->diet_suggestion:Ljava/lang/String;

    .end local v1           #temp:Ljava/lang/Double;
    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {p0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v1, Lcom/teewoo/app/bus/model/weather/Weather;->suggestion2:[Ljava/lang/String;

    const/4 v2, 0x3

    invoke-virtual {v0, v2}, Ljava/util/Random;->nextInt(I)I

    move-result v0

    .end local v0           #ran:Ljava/util/Random;
    aget-object v0, v1, v0

    invoke-virtual {p0, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object p0

    invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    goto :goto_1

    .line 99
    .restart local v0       #ran:Ljava/util/Random;
    .restart local v1       #temp:Ljava/lang/Double;
    .restart local p0       #hum:Ljava/lang/Double;
    :cond_1
    invoke-virtual {p0}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    const-wide/high16 v4, 0x404e

    cmpl-double v2, v2, v4

    if-lez v2, :cond_2

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    const-wide/high16 v4, 0x4034

    cmpl-double v2, v2, v4

    if-lez v2, :cond_2

    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    const-wide/high16 v4, 0x403e

    cmpg-double v2, v2, v4

    if-gez v2, :cond_2

    .line 100
    new-instance p0, Ljava/lang/StringBuilder;

    .end local p0           #hum:Ljava/lang/Double;
    sget-object v1, Lcom/teewoo/app/bus/model/weather/Weather;->diet_suggestion:Ljava/lang/String;

    .end local v1           #temp:Ljava/lang/Double;
    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {p0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v1, Lcom/teewoo/app/bus/model/weather/Weather;->suggestion3:[Ljava/lang/String;

    const/4 v2, 0x3

    invoke-virtual {v0, v2}, Ljava/util/Random;->nextInt(I)I

    move-result v0

    .end local v0           #ran:Ljava/util/Random;
    aget-object v0, v1, v0

    invoke-virtual {p0, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object p0

    invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    goto :goto_1

    .line 101
    .restart local v0       #ran:Ljava/util/Random;
    .restart local v1       #temp:Ljava/lang/Double;
    .restart local p0       #hum:Ljava/lang/Double;
    :cond_2
    invoke-virtual {p0}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v2

    const-wide/high16 v4, 0x404e

    cmpl-double p0, v2, v4

    if-lez p0, :cond_3

    .end local p0           #hum:Ljava/lang/Double;
    invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v1

    .end local v1           #temp:Ljava/lang/Double;
    const-wide/high16 v3, 0x403e

    cmpl-double p0, v1, v3

    if-lez p0, :cond_3

    .line 102
    new-instance p0, Ljava/lang/StringBuilder;

    sget-object v1, Lcom/teewoo/app/bus/model/weather/Weather;->diet_suggestion:Ljava/lang/String;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {p0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v1, Lcom/teewoo/app/bus/model/weather/Weather;->suggestion4:[Ljava/lang/String;

    const/4 v2, 0x3

    invoke-virtual {v0, v2}, Ljava/util/Random;->nextInt(I)I

    move-result v0

    .end local v0           #ran:Ljava/util/Random;
    aget-object v0, v1, v0

    invoke-virtual {p0, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object p0

    invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    goto/16 :goto_1

    .line 104
    .restart local v0       #ran:Ljava/util/Random;
    :cond_3
    new-instance p0, Ljava/lang/StringBuilder;

    sget-object v0, Lcom/teewoo/app/bus/model/weather/Weather;->diet_suggestion:Ljava/lang/String;

    .end local v0           #ran:Ljava/util/Random;
    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    invoke-direct {p0, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v0, Lcom/teewoo/app/bus/model/weather/Weather;->suggestion:Ljava/lang/String;

    invoke-virtual {p0, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object p0

    invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    goto/16 :goto_1
.end method


# virtual methods
.method public AddForecastCondition(Lcom/teewoo/app/bus/model/weather/ForecastCondition;)V
    .locals 1
    .parameter "mForecastCondition"

    .prologue
    .line 46
    iget-object v0, p0, Lcom/teewoo/app/bus/model/weather/Weather;->forecasts:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 47
    return-void
.end method

.method public getCurrentCondition()Lcom/teewoo/app/bus/model/weather/CurrentCondition;
    .locals 1

    .prologue
    .line 65
    iget-object v0, p0, Lcom/teewoo/app/bus/model/weather/Weather;->currentCondition:Lcom/teewoo/app/bus/model/weather/CurrentCondition;

    return-object v0
.end method

.method public getForecastInformation()Lcom/teewoo/app/bus/model/weather/ForecastInformation;
    .locals 1

    .prologue
    .line 57
    iget-object v0, p0, Lcom/teewoo/app/bus/model/weather/Weather;->forecastInformation:Lcom/teewoo/app/bus/model/weather/ForecastInformation;

    return-object v0
.end method

.method public getForecasts()Ljava/util/List;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List",
            "<",
            "Lcom/teewoo/app/bus/model/weather/ForecastCondition;",
            ">;"
        }
    .end annotation

    .prologue
    .line 71
    iget-object v0, p0, Lcom/teewoo/app/bus/model/weather/Weather;->forecasts:Ljava/util/List;

    return-object v0
.end method

.method public setCurrentCondition(Lcom/teewoo/app/bus/model/weather/CurrentCondition;)V
    .locals 0
    .parameter "currentCondition"

    .prologue
    .line 68
    iput-object p1, p0, Lcom/teewoo/app/bus/model/weather/Weather;->currentCondition:Lcom/teewoo/app/bus/model/weather/CurrentCondition;

    .line 69
    return-void
.end method

.method public setForecastInformation(Lcom/teewoo/app/bus/model/weather/ForecastInformation;)V
    .locals 0
    .parameter "forecastInformation"

    .prologue
    .line 61
    iput-object p1, p0, Lcom/teewoo/app/bus/model/weather/Weather;->forecastInformation:Lcom/teewoo/app/bus/model/weather/ForecastInformation;

    .line 62
    return-void
.end method

.method public setForecasts(Ljava/util/List;)V
    .locals 0
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Lcom/teewoo/app/bus/model/weather/ForecastCondition;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 74
    .local p1, forecasts:Ljava/util/List;,"Ljava/util/List<Lcom/teewoo/app/bus/model/weather/ForecastCondition;>;"
    iput-object p1, p0, Lcom/teewoo/app/bus/model/weather/Weather;->forecasts:Ljava/util/List;

    .line 75
    return-void
.end method
